﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Smart_Transportation.Entities;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace Smart_Transportation.DAL
{
    public class DALUser
    {

        string conStr = ConfigurationSettings.AppSettings["ConnectionString"];
        /// <summary>
        /// List all account from data base
        /// </summary>
        /// <returns></returns>
        public DataTable ListAllAccount()
        {
            SqlConnection con = new SqlConnection(conStr);
            string sql = "SELECT * FROM tblAccount";
            SqlDataAdapter da = new SqlDataAdapter(sql, con);
            DataTable Alluser = new DataTable();
            da.Fill(Alluser);
            return Alluser;
        }
    }
}